#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_add_clicked()
{
    //先获取透明度
    qDebug()<<this->windowOpacity();
    this->setWindowOpacity(windowOpacity()-0.22);
}

void Widget::on_sub_clicked()
{
    qDebug()<<this->windowOpacity();
   this->setWindowOpacity(windowOpacity()+0.22);
}
